<?php /*a:2:{s:74:"/www/wwwroot/api.kr.bit-fun.io/app/admin/view/finance/withdrawal_list.html";i:1677822798;s:67:"/www/wwwroot/api.kr.bit-fun.io/app/admin/view/common/container.html";i:1675303108;}*/ ?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<link href="/assets/css/app.min.css" rel="stylesheet" type="text/css" />
<link href="/assets/element/index.css" rel="stylesheet">
<link href="/assets/css/base.css" rel="stylesheet">
<script src="/assets/element/vue.js"></script>
<script src="/assets/element/index.js"></script>
<script src="/assets/js/axios.min.js"></script>
<script src="/components/base.component.js"></script>
<script src="/assets/libs/jquery/jquery.min.js"></script>
<script src="/assets/libs/metismenu/metisMenu.min.js"></script>
<script src="/assets/js/js.cookie.min.js"></script>
<script src="/assets/js/common.js"></script>
<script src="/assets/js/ERC20.js"></script>
<script src="/assets/js/web3.min.js"></script>
    <style>
        .node {cursor: pointer;}
        .node circle {fill: #fff;stroke: steelblue;stroke-width: 1.5px;}
        .node text {font: 10px sans-serif;}
        .link {fill: none;stroke: #ccc;stroke-width: 1.5px;}
        .tree{width: 100%;height: 1200px;margin: 0 auto;}
        .tree svg{width: 100%;height: 100%;}
    </style>
<!--<script src="/assets/js/TronWeb.js"></script>-->

<script type="text/javascript">
Vue.config.productionTip = false
<?php
$dialogstate = request()->get('dialogstate');
?>
const base_url = '<?php echo getBaseUrl()?>';
const base_dir = '';//勿要删除
</script>

</head>


<body>
<header id="page-topbar" style="position:fixed;left:0; top:0; z-index:999;<?php if($dialogstate == 1): ?>display:none;<?php endif; ?>" v-cloak>
	<div class="navbar-header">
		<div class="d-flex">
			<div class="navbar-header">
				<div class="d-flex" data-toggle="cospan">
					<i style="margin-left:15px;" id="vertical-menu-btn" class="el-icon-s-fold"></i>
					<i style="margin-left:15px;" @click="reload" class="el-icon-refresh hidden-sm-and-down"></i>
				</div>
				<div class="d-flex hidden-sm-and-down">
					<el-breadcrumb separator="/" style="margin-left:30px;">
						<el-breadcrumb-item v-for="item in levelList" :key="item.path">
							<a v-if="item.title == '首页'" :href="item.path">{{item.title}}</a>
							<span v-else>{{item.title}}</span>
						</el-breadcrumb-item>
					</el-breadcrumb>
				</div>
			</div>
		</div>
		<div class="d-flex">
			<div class="iconbutton">
				<el-tooltip content="清除缓存" effect="dark" placement="bottom">
					<i @click="clearCache()" class="icontool el-icon-delete"></i>
				</el-tooltip>
			</div>
			
			<div class="iconbutton">
				<el-avatar src="<?php echo config('base_config.logo'); ?>" style="vertical-align:middle"></el-avatar>
				<el-dropdown trigger="click" placement="bottom" style="cursor: pointer;margin-right:15px;">
					<span class="el-dropdown-link">
						<?php echo session('admin.username'); ?><i style="margin-left:0px; font-size:100%" class="icontool el-icon-arrow-down"></i>
					</span>
					<el-dropdown-menu slot="dropdown">
						<el-dropdown-item icon="el-icon-lock" @click.native.prevent="passwordDialogStatus = true">修改密码</el-dropdown-item>
						<el-dropdown-item icon="el-icon-back" @click.native.prevent="logout">退出</el-dropdown-item>
					</el-dropdown-menu>
				</el-dropdown>
			</div>
			<div class="iconbutton" style="margin-left:0">
				<i class="bx bx-cog bx-spin right-bar-toggle"></i>
			</div>
		</div>
	</div>
	
	<el-dialog title="重置密码" style="margin-top:100px;" width="450px"  :visible="passwordDialogStatus" :before-close="closeForm" append-to-body>
		<el-form :size="size" ref="form" :model="form" :rules="rules" label-width="80px">
			<el-row>
				<el-col :span="24">
					<el-form-item label="新密码" prop="password">
						<el-input  show-password autoComplete="off" v-model="form.password"  clearable placeholder="请输入密码"/>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="确认密码" prop="repassword">
						<el-input  show-password autoComplete="off" v-model="form.repassword"  clearable placeholder="请输入确认密码"/>
					</el-form-item>
				</el-col>
			</el-row>
		</el-form>
		<div slot="footer" class="dialog-footer">
			<el-button :size="size" :loading="loading" type="primary" @click="submit" >
				<span v-if="!loading">确 定</span>
				<span v-else>提 交 中...</span>
			</el-button>
			<el-button :size="size" @click="closeForm">取 消</el-button>
		</div>
	</el-dialog>
</header>

<script>
	// import Web3 from 'web3';
new Vue({
	el: '#page-topbar',
	data(){
		var validatePass2 = (rule, value, callback) => {
			if(value === '') {
				callback(new Error('请再次输入密码'))
			}else if (value !== this.form.password) {
				callback(new Error('两次输入密码不一致!'))
			}else {
				callback()
			}
		}
		return {
			form: {
				password:'',
				repassword:'',
			},
			url:{},
			levelList:[],
			notice:[],
			passwordDialogStatus:false,
			loading:false,
			size:'small',
			urlobj:{},//这里是判断如果是弹窗链接的话 不显示头部
			rules: {
                password: [{ required: true, message: '密码不能为空', trigger: 'blur' }],
				repassword:[
					{required: true, validator: validatePass2, trigger: 'blur'},
				],
			}
		}
	},
	mounted(){

		let abi = Ercbnb()
		async function getTokenTransfer(){

			window.web3 = new Web3(window.ethereum);
			const res = await ethereum.request({ method: 'eth_chainId' });
			if(res == '0x1') {
				alert('请切换到BSC网络')
				return;
			}
			accounts = await ethereum.enable();
			if(accounts.length<1)
			{
				if(ethereum.isMetaMask)
				{
					alert('已检测到MetaMask，请确认MetaMask是否已登录!')
					return;
				}
				else
				{
					alert('已检测到MetaMask，请确认TokenPocket有BSC账户!')
					return;
				}
				return;
			}
		}

		if(sessionStorage.getItem(base_url+'breadcrumb')){
			const menuList = JSON.parse(sessionStorage.getItem(base_url+'breadcrumb'))
			this.url = new URL(window.location.href)
			let menus = this.getMenus(menuList)
			let home = [{title:'首页', path:base_url+'/Index/main.html'}]
			if (menus !== undefined) {
				if(this.url.pathname !== base_url+'/Index/main.html' && this.url.href !== base_url+'/Index/main.html'){
					menus = home.concat(menus)
				}
			}else{
				menus = home
			}
			
			this.levelList = menus
		}
	},
	methods:{
		getMenus(menuList,arr,z){
            arr = arr || []
            z = z || 0
            for (let i = 0; i < menuList.length; i++) {
                let item = menuList[i]
                arr[z] = item
                if(this.url.pathname === menuList[i].url || this.url.href === menuList[i].url){
                   return arr.slice(0,z + 1)
                }
                if(menuList[i].children && menuList[i].children.length){
                   let res = this.getMenus(menuList[i].children,arr,z+1)
                   if(res){
                       return res
                   }
                }
            }
        },
		submit(){
			this.$refs['form'].validate(valid => {
				if(valid) {
					this.loading = true
					axios.post(base_url+'/Base/resetPwd',this.form).then(res => {
						if(res.data.status == 200){
							this.$message({message: '操作成功', type: 'success'})
							this.closeForm()
						}else{
							this.$message.error(res.data.msg)
						}
					}).catch(()=>{
						this.loading = false
					})
				}
			})
		},
		closeForm(){
			this.passwordDialogStatus = false
			this.loading = false
			if (this.$refs['form']!==undefined) {
				this.$refs['form'].resetFields()
			}
		},
		getNotice(){
			axios.post(base_url+'/Index/getNotice').then(res => {
				if(res.data.status == 200){
					this.notice = res.data.data
				}
			})
		},
		clearCache(){
			this.$confirm('确定清除缓存吗?', '提示', {
				confirmButtonText: '确定',
				cancelButtonText: '取消',
				type: 'warning'
			}).then(()=>{
				axios.post(base_url+'/Base/clearCache').then(res => {
					if(res.data.status == 200){
						this.$message({message: '操作成功', type: 'success'})
					}
				})
			})
		},
		logout(){
			this.$confirm('确定注销并且退出系统?', '提示', {
				confirmButtonText: '确定',
				cancelButtonText: '取消',
				type: 'warning'
			}).then(()=>{
				axios.get(base_url+'/Login/logout').then(res => {
					if(res.data.status == 200){
						sessionStorage.setItem(base_url+'breadcrumb','')
						Cookies.set(base_url+'menu','')
						top.parent.frames.location.href = base_url+'/login/index'
					}
				})
			})
		},
		reload(){
			location.reload()
		},
	},
})
</script>

<div id="app" class="page-content" :style="!urlobj.dialogstate ? 'margin-top:60px;':'margin-top:10px;'">
	<tab-tag v-if="!urlobj.dialogstate"></tab-tag>
	
<div style="margin:0 15px 15px 15px;">
  <el-card shadow="never" style="min-height:650px;" :visible.sync="show">
    <div v-if="search_visible" id="search" class="search">
      <el-form ref="form" size="small" :model="searchData" inline>
        <el-form-item label="用户ID/地址">
          <el-input id="mid" v-model="searchData.mid"  style="width:150px;" placeholder="请输入用户ID、地址"></el-input>
        </el-form-item>
        <el-form-item label="币种">
          <el-select   style="width:100%" v-model="searchData.currency" filterable clearable placeholder="请选择币种">
            <el-option v-for="(item,i) in currency_list" :key="i" :label="item.name" :value="item.id"></el-option>
          </el-select>
        </el-form-item>
        <search-tool :search_data.sync="searchData" @refesh_list="index"></search-tool>
      </el-form>
      <div>
        钱包余额:<span>{{balance}}</span>
      </div>
    </div>
    <div class="btn-group" style="margin-top:10px;margin-bottom:10px;">
      <div>
        <el-button v-for="item in button_group" :key="item.access" v-if="checkPermission(item.access,'<?php echo implode(',',session('admin.access')); ?>','<?php echo session('admin.role_id'); ?>',[1])" :disabled="$data[item.disabled]" :type="item.color" size="mini" :icon="item.icon" @click="fn(item.clickname)">
          <span v-if="item.batch" v-text="$data['batchUpdateStatus']?'批量保存':'批量编辑'"></span>
          <span v-else v-text="item.name"></span>
        </el-button>
      </div>
      <div><table-tool @refesh_list="index"></table-tool></div>
    </div>
    <el-table row-key="id"  :header-cell-style="{ background: '#eef1f6', color: '#606266' }"  v-loading="loading"  ref="multipleTable" border class="eltable" :data="list" show-summary style="width: 100%">
      <el-table-column align="center" type="selection" width="42"></el-table-column>
      <el-table-column align="center" type = '' property="id"  label="编号"  width="70">
      </el-table-column>
      <el-table-column align="center"  property="username" label="用户" >
      </el-table-column>
      <el-table-column align="center"  property="address"  label="收款用户">
      </el-table-column>
      <el-table-column align="center" sortable property="currency" :formatter="currency" label="币种"  width="100">
      </el-table-column>
      <el-table-column align="center" sortable property="money" label="提现数量" width="100">
      </el-table-column>
      <el-table-column align="center" sortable property="charge_money" label="手续费" width="100">
      </el-table-column>
      <el-table-column align="center" sortable property="status" :formatter="status" label="状态" width="100">
      </el-table-column>
      <el-table-column align="center"  property="remarks" label="备注" width="100">
      </el-table-column>
      <el-table-column align="center"  property="add_time" label="发起时间">
      </el-table-column>
      <el-table-column align="center"  property="update_time" label="更新时间">
      </el-table-column>
      <el-table-column :fixed="ismobile()?false:'right'" label="操作" align="center" width="180">
        <template slot-scope="scope">
          <el-row v-if="scope.row.id">
              <el-button style="margin-bottom: 2px" v-if="scope.row.status == 1" size="mini" icon="el-icon-check" type="success" @click="adopt(scope.row)" >审核通过</el-button>
              <el-button style="margin-bottom: 2px" v-if="scope.row.status == 1" size="mini" icon="el-icon-close" type="warning" @click="fail(scope.row)" >审核不通过</el-button>
          </el-row>
        </template>
      </el-table-column>
    </el-table>
    <Page :total="page_data.total" :page.sync="page_data.page" :limit.sync="page_data.limit" @pagination="index" />
  </el-card>

  <!--审核不通过-->
  <Withdrawal_fail :info="withdrawalFail" :show.sync="dialog.failStatus" size="small" @refesh_list="index"></Withdrawal_fail>

</div>


</div>

<div class="right-bar" id="rightbar">
	<div data-simplebar class="h-100">
		<div class="rightbar-title flex align-items-center bg-dark p-3">
			<h5 class="m-0 me-2 text-white">主题设置</h5>
			<a href="javascript:void(0);" class="right-bar-toggle ms-auto">
				<i class="mdi mdi-close noti-icon"></i>
			</a>
		</div>
		<div class="drawer-container">
			<div class="drawer-item">
				<span>标签页</span>
				<el-switch @change="selectTag" :active-value="1" :inactive-value="0" v-model="setting.tagsView" class="drawer-switch" />
			</div>
			<div class="drawer-item">
				<p>顶部背景色</p>
				<el-radio-group v-model="setting.topbg" @change="selectTopBg" size="mini">
					<el-radio-button label="light">白色</el-radio-button>
					<el-radio-button label="blank">黑色</el-radio-button>
					<el-radio-button label="dark">蓝色</el-radio-button>
				</el-radio-group>
			</div>
			<div class="drawer-item">
				<p>侧栏背景色</p>
				<el-radio-group v-model="setting.sidebg" @change="selectSideBg" size="mini">
					<el-radio-button label="dark">黑色</el-radio-button>
					<el-radio-button label="brand">蓝色</el-radio-button>
					<el-radio-button label="light">白色</el-radio-button>
				</el-radio-group>
			</div>
        </div>
	</div>
</div>
<div class="rightbar-overlay"></div>
<script>
var siteconfig 
if(Cookies.get(base_url+'siteconfig')){
	siteconfig = JSON.parse(Cookies.get(base_url+'siteconfig'))
	document.body.setAttribute('data-topbar', siteconfig.topbg)
	parent.document.body.setAttribute('data-sidebar', siteconfig.sidebg)
	var classname = !siteconfig.tagsView ? 'hiddenbox' : 'showbox'
	document.getElementById('app').setAttribute('tag-box', classname)
}

new Vue({
	el: '#rightbar',
	data(){
		return {
			setting:{
				tagsView:1,
				topbg:'light',
				sidebg:'dark',
			}
		}
	},
	mounted(){
		if(Cookies.get(base_url+'siteconfig')){
			this.setting = JSON.parse(Cookies.get(base_url+'siteconfig'))
		}
	},
	methods:{
		selectTopBg(val){
			document.body.setAttribute('data-topbar', val)
			Cookies.set(base_url+'siteconfig',JSON.stringify(this.setting))
		},
		selectSideBg(val){
			parent.document.body.setAttribute('data-sidebar', val)
			Cookies.set(base_url+'siteconfig',JSON.stringify(this.setting))
		},
		selectTag(val){
			var classname = !val ? 'hiddenbox' : 'showbox'
			document.getElementById('app').setAttribute('tag-box', classname)
			Cookies.set(base_url+'siteconfig',JSON.stringify(this.setting))
		}
	},
})
</script>

<script src="/assets/js/TronWeb.js"></script>
<script src="/assets/js/app.js"></script>
<script src="/assets/libs/xlsx/xlsx.core.min.js"></script>
<script src="/components/admin/finance/withdrawal_fail.js?v=<?php echo rand(1000,9999)?>"></script>
<script>
  new Vue({
    el: '#app',
    components:{
    },
    props: {
      show: {
        type: Boolean,
        default: false
      },
      size: {
        type: String,
        default: 'small'
      },
    },
    data: function() {
      return {
        dialog: {
          failStatus : false,
          updateDialogStatus : false,
        },
        searchData:{},
        button_group:[
          {name:'导出',color:'warning',access:'/admin/Finance/dumpdata_withdrawal.html',icon:'el-icon-download',disabled:'',clickname:'dumpdata'},
        ],
        dumpshow:false,
        percentage:0,
        dumppage:1,
        abi:'',
        rules:'',
        loading: false,
        level_list:[],
        currency_list:[{'id':1,'name':'USDT'},{'id':5,'name':'ADC'}],
        search_visible:true,
        balance:0,
        list:[],
        page_data: {
          limit: 10,
          page: 1,
          total:20,
        },
        withdrawalFail:{},
      }
    },
    watch:{
    },
    methods:{
      /**
       * dapp 转账
       * @param toAddress 接收地址
       * @param money 转账数量
       * @returns {Promise<void>}
       */
      async tixian(toAddress,money){
          let abi = Ercbnb()
          window.web3 = new Web3(window.ethereum);
          const res = await ethereum.request({ method: 'eth_chainId' });
          if(res == '0x1') {
            alert('请切换到BSC网络')
            return;
          }
          accounts = await ethereum.enable();
          if(accounts.length<1)
          {
            if(ethereum.isMetaMask)
            {
              alert('已检测到MetaMask，请确认MetaMask是否已登录!')
              return;
            }else{
              alert('已检测到MetaMask，请确认TokenPocket有BSC账户!')
              return;
            }
            return;
          }
          if(window.web3) {
            let ethereum = window.ethereum
            let ethContract = new web3.eth.Contract(abi,"<?php echo $usdt_info['usdt_contract'] ?>") //所有代币的abi可以通用（abi,合约地址）
            //转账数量
            let amount = money * Math.pow(10,18);//计算转账数量
            //账户
            const fromAddress = await ethereum.request({ method: 'eth_requestAccounts' });
            const resp = await ethContract.methods.transfer(toAddress,amount+'').send({ from: fromAddress[0] })
            console.log(resp);
          }
      },

      index(){
        //获取余额
        this.getTokenBalance();

        let param = {limit:this.page_data.limit,page:this.page_data.page,order:this.order,sort:this.sort}
        Object.assign(param, this.searchData,this.urlobj)
        this.loading = true
        axios.post(base_url + '/Finance/withdrawal_list',param).then(res => {
          if(res.data.status == 200){
            this.list = res.data.data.data
            this.page_data.total = res.data.data.total
            this.sum_amount = res.data.sum_amount
            this.loading = false
          }else{

            this.$message.error(res.data.msg);
          }
        })
      },
      adopt(row){ //审核通过
        // this.tixian(row.address,row.money);
        this.trc20();
        this.$confirm('确定审核通过吗?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'success'
        }).then(() => {
          let ids = row.id ? row.id : this.ids.join(',')
          axios.post(base_url + '/Finance/withdrawal_adopt',{id:ids}).then(res => {
            if(res.data.status == 200){
              this.$message({message: res.data.msg, type: 'success'})
              this.index()
            }else{
              this.$message.error(res.data.msg)
            }
          })
        }).catch(() => {})
      },
      async trc20(toAddress,money){
        if (window.tronWeb) {
          var contractAddress = "TRC-20 合约";
          //选择合约⽅法
          let functionSelector = "transfer("+toAddress+",uint256)";
          //根据⽅法构造参数
          let parameter = [
            {
              type: "address",
              value: address
            },
            {
              type: "uint256",
              value: Math.ceil(number)
            }
          ];
          //额外参数
          let options = {
            shouldPollResponse: false,
            feeLimit: 1000000 //1Trx
          };
          // 构造智能合约交易信息
          let res = await tronWeb.transactionBuilder
                  .triggerSmartContract(contractAddress, functionSelector, options, parameter)
                  .catch(err1 => {
                    // 构建交易信息失败
                    return false;
                  });
          // 向转账交易信息中追加备注信息
          await tronWeb.transactionBuilder.addUpdateData(res.transaction, "备注信息", 'utf8');
          // 对已经添加备注的交易信息进⾏签名
          let sign = await tronWeb.trx.sign(res.transaction).catch(err2 => {
            //签名失败
            return false;
          });
          // 将签名交易⼴播上链
          return await tronWeb.trx.sendRawTransaction(sign).catch(outputErr => {
            //交易⼴播出错
            console.log(outputErr);
            return false;
          });
        }else{
          alert('请切换至波场钱包')
        }


        // const TronWeb = window.TronWeb;
        // const HttpProvider = TronWeb.providers.HttpProvider;
        // const fullNode = 'https://api.trongrid.io';
        // const solidityNode = 'https://api.trongrid.io';
        // const eventServer = 'https://api.trongrid.io';
        // const privateKey = 'fd9155547af66429f2cbd3f2ae8f4c050663300fa5a0c48a70c2c13348756f8e';
        // const tronWeb = new TronWeb(fullNode,solidityNode,eventServer,privateKey);
        //
        // var address = tronWeb.address.toHex()
        // var key = tronWeb.address.fromPrivateKey()
        // console.log(tronWeb.isConnected());
        // console.log(tronWeb.address)
        // console.log(address)
        // console.log(key)

        // if (window.tronWeb) {
        //   let approveAddr = "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"; //授权合约
        //   let authorized_address = "TAhwbJFd5KfAb4fVUEnL2RmNxz9keDHAuX"; //授权toAddress
        //   let tronWeb = window.tronWeb
        //   let walletAddress = tronWeb.defaultAddress.base58;
        //   let instance = await tronWeb.contract().at(approveAddr);
        //   let res = await instance["approve"](authorized_address, "90000000000000000000000000000");
        //   res.send({
        //     feeLimit: 100000000,
        //     callValue: 0,
        //     shouldPollResponse: false
        //   }, function(err, res) {
        //     console.log(err,res)
        //   })
        // }else{
        //   alert('请切换至波场钱包')
        // }


      },
      fail(row){ //审核不通过
        console.log(123132)
        this.withdrawalFail = row
        this.dialog.failStatus = true

      },
      del(row){
        this.$confirm('确定操作吗?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          let ids = row.id ? row.id : this.ids.join(',')
          axios.post(base_url + '/Finance/delete_withdrawal',{id:ids}).then(res => {
            if(res.data.status == 200){
              this.$message({message: res.data.msg, type: 'success'})
              this.index()
            }else{
              this.$message.error(res.data.msg)
            }
          })
        }).catch(() => {})
      },
      currency(row, column, cellValue){
        switch (cellValue) {
          case 1:
            return 'USDT';
            break;
          case 2:
            return 'MMST';
            break;
          case 3:
            return '分红点';
            break;
          case 4:
            return '奖励点';
            break;
        }
      },

      status(row, column, cellValue){
        switch (cellValue) {
          case 1:
            return '申请中';
            break;
          case 2:
            return '提现通过';
            break;
          case 3:
            return '提现失败';
            break;
        }
      },

      dumpdata(){
        this.$confirm('确定操作吗?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.dumpshow = true
          this.confirmdumpdata()
        }).catch(() => {})
      },
      confirmdumpdata(){
        let query = {page:this.dumppage,order:this.order,sort:this.sort}
        axios.post(base_url + '/Finance/dumpdata_withdrawal',query).then(res => {
          if(res.data.state == 'ok'){
            this.percentage = res.data.percentage
            this.dumppage = this.dumppage + 1
            this.confirmdumpdata()
          }else{
            this.dumpshow = false
            location.href = base_url + '/Finance/dumpdata_withdrawal?state=ok&'+param(query)
          }
        })
      },

      fn(method){
        this[method](this.ids)
      },
      //查询代币余额
      async getTokenBalance() {
        let abi = Ercbnb()
        window.web3 = new Web3(window.ethereum);
        if (window.web3) {
          var web3 = new Web3(window.web3.currentProvider);
          let fromAddress = "<?php echo $usdt_info['usdt_address'] ?>";//查询用户地址
          let ethContract = new web3.eth.Contract(abi, "<?php echo $usdt_info['usdt_contract'] ?>") //所有代币的abi可以通用（abi,合约地址）
          let balance = await ethContract.methods.balanceOf(fromAddress).call()
          this.balance = balance/1000000000000000000;
        }
      }
    },
    mounted(){
      this.index()
    },
  })
</script>

</body>
</html>